package logs

import (
	"context"
	"time"
)

type LogJob struct {
	jobID   string
	jobName string
}

func NewLogJob(name string) *LogJob {
	return &LogJob{
		jobID:   name + "-log",
		jobName: name,
	}
}

func (l *LogJob) ID() string   { return l.jobID }
func (l *LogJob) Name() string { return l.jobName }
func (l *LogJob) Type() string { return "log" }

func (l *LogJob) Run(ctx context.Context) error {
	// 模拟日志收集
	select {
	case <-time.After(3 * time.Second):
		return nil
	case <-ctx.Done():
		return ctx.Err()
	}
}
